package domain.service.user;

import domain.dao.user.UserWatchLoginDao;
import domain.entity.UserWatchLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * Created by Administrator on 2017/9/6.
 */
@Service
public class UserWatchLoginService {
    @Autowired
    private UserWatchLoginDao userWatchLoginDao;

    public Long getUserWatchCou(String openid){
        return userWatchLoginDao.getUserWatchCou(openid);
    }

    public void insertUserWatch(UserWatchLogin userWatchLogin){
        UUID uid = UUID.randomUUID();
        userWatchLogin.setWATCHID(uid.toString());
        userWatchLoginDao.insertUserWatch(userWatchLogin);
    }
}
